function ServerPrefixHead(req) {

	var PREFIX_DETECTION = "/" + KeyFactory.SERVER_TOKEN + "/";
	
	var stat, prefix;
	
	var toks = req.getStatusLine().split(" ");

	if(toks[1].substring(0,PREFIX_DETECTION.length) == PREFIX_DETECTION) {
		prefix = toks[1].substring(PREFIX_DETECTION.length, toks[1].length).split("/")[0];
		stat = toks[0] + " " + toks[1].substring((PREFIX_DETECTION + prefix).length, toks[1].length) + " " + toks[2];
	}
	else {
		stat = req.getStatusLine();
		prefix = null;
	}
	
	AbstractRequest.call(this, req);


	this.getStatusLine = function() {
		return stat;
	}

	this.getPrefix = function() {
		return prefix;
	}

	this.getPath = function() {
		return this.getStatusLine().split("\\ ")[1];
	}
}

function ServerPrefixHeadInit(prefix, req) {
	var PREFIX_DETECTION = "/" + KeyFactory.SERVER_TOKEN + "/";
	
	var pre = prefix;
	
	if(pre == null || pre == undefined) 
		pre = req.getPath();
	else
		pre = PREFIX_DETECTION + prefix + req.getPath();
	
	
	AbstractRequest.call(this, new RequestHeadInit(req.getHTTPMethod(), pre, req));
	
	this.getPrefix = function() {
		return prefix;
	}
}
